from selenium import webdriver
import time
from selenium.webdriver.common.by import By


class PublicOperations:

    @staticmethod
    def getDriver():
        driver = webdriver.Chrome()

        driver.get(url='http://localhost:90/')

        driver.maximize_window()

        return driver


    @staticmethod
    def Operate(driver,arg1,arg2):
        time.sleep(1)
        driver.find_element(By.XPATH, f'//nav[@class="sidebar-main"]/ul/li[{arg1}]').click()
        time.sleep(1)
        driver.find_element(By.XPATH, f'//nav[@class="sidebar-main"]/ul/li[{arg1}]/ul/li[{arg2}]/a').click()
        time.sleep(1)




